package vip.george.bean.config;


import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnNotWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import vip.george.bean.animal.Cat;
import vip.george.bean.animal.Dog;
import vip.george.bean.selector.MyImportSelector;


@ComponentScan("vip.george.bean.config.optional")
public class AppConfig2 {



    @Bean
    @ConditionalOnClass(name = "vip.george.bean.animal.Mouse")
    @ConditionalOnNotWebApplication
    public Cat cat(){
        return new Cat();
    }

}
